<ion-scroll style="height:100%;"  class="crm-content-no-padding"  ng-controller="HotelListPublicFavoriteCtrl" >
  <ion-refresher
          pulling-text="下拉刷新"
          on-refresh="hotels.refresh()">
  </ion-refresher>
  <ul class="list" style="background-color: #EEEEEE;">
    <li class="item-input-inset crm-item-search">
      <label class="item-input item-input-wrapper">
        <i class="icon ion-search placeholder-icon"></i>
        <input type="text" placeholder="输入酒店名称、ID、地址" ng-model="hotels.search.value" ng-change="hotels.search.doAct()">
      </label>
      <button class="button" ui-sref="app.hotel-list-filter({type:HOTEL_TYPE})">
        <i class="fa fa-filter fa-lg" ng-class="{'energized':isFilter()}"></i>
      </button>
    </li>
    <li class='item item-icon-right' ng-click="goHotelMain(hotel)" ng-if="hotel.isFavoriate == 'T'" ng-repeat="hotel in hotels.data">
      <h2>
        {{hotel.hotelName}}&nbsp;
        <b class="task-active" ng-if="hotel.hotelRank">{{hotel.hotelRank+'级'}}</b>
      </h2>
      <p><small>进入公海时间：{{ hotel.returnTime | date:'yyyy-MM-dd'  }}&nbsp;</small></p>
      <p><small>{{hotel.detailAddr}}&nbsp;</small></p>
      <i class="icon ion-ios-telephone balanced"  ng-click="showTelList($event,hotel)"></i>
      <div class="padding-top">
        <button class="button button-small button-energized" ng-if="!hotel.isClaimed" ng-click="doClaim($event,hotel)">
          认领
        </button>
        <button class="button button-small button-energized" ng-if="hotel.isClaimed" ng-disabled="true">
          已认领
        </button>
        <button class="button button-small button-energized" ng-if="hotel.isFavoriate != 'T'" ng-click="doFavoriteAdd($event,hotel)">
          收藏
        </button>
        <button class="button button-small button-energized" ng-if="hotel.isFavoriate == 'T'" ng-click="doFavoriteRemove($event,hotel)">
          取消收藏
        </button>
      </div>
    </li>
    <li class='item text-center' ng-if="hotels.loaded && hotels.data.length==0">
      <p>很抱歉，没找到符合的酒店，请更改搜索条件</p>
    </li>
    <li class='item item-divider' style="height:30px;border-bottom:none;background-color: transparent;">
      &nbsp; <!--fixed tab bug-->
    </li>
  </ul>
  <ion-infinite-scroll
          ng-if="hotels.moreDataCanBeLoaded"
          on-infinite="hotels.loadMore()"
          distance="5%"
          spinner="dots">
  </ion-infinite-scroll>
</ion-scroll>
<style>
  .button-small{
    min-width:68px;
  }
</style>
